<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/webpage/common/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
  <title>配送装车单冷链查询</title>
  <meta name="decorator" content="list"/>
</head>
<body title="配送装车单冷链查询">
<grid:grid id="ccZcdMxGridId" url="${adminPath}/cc/zcd/mx/zcdMxAjaxList" shrinkToFit="false" multiselect="false" datatype="local" beforeInit="true" afterInit="true">
    <grid:column label="sys.common.opt" name="opt" formatter="button" width="80" sortable = "false"/>
    <grid:button title="cc.humiture.title"  groupname="opt" function="rowDialogDetail" outclass="btn-primary" url="${adminPath}/cc/device/humiture?sn=\"+row.sbSn+\"&carFlag=\"+row.carFlag+\"&pointone=\"+row.pointone+\"&pointtwo=\"+row.pointtwo+\"&beginDate=\"+row.beginDate+\"&endDate=\"+row.endDate+\"&wendMin=\"+row.wendMin+\"&wendMax=\"+row.wendMax+\"" />
    <grid:column label="cc.zcdMx.danjNo" name="danjNo" width="110" query="true"  condition="like"/>
    <grid:column label="cc.zcdMx.beginDate" name="beginDate" query="true" queryMode="date" condition="between"/>
    <grid:column label="cc.zcdMx.endDate" name="endDate"/>
    <grid:column label="cc.zcdMx.sbSn" name="sbNo" width="70" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.boxSn" name="boxNo" width="70" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.sbSn" name="sbSn" width="70" hidden="true"/>
    <grid:column label="cc.zcdMx.boxSn" name="boxSn" width="70" hidden="true"/>
    <grid:column label="cc.zcdMx.carFlag" name="carFlag" dict="sf" width="70"/>
    <grid:column label="cc.zcdMx.pointone" name="pointone" width="70"/>
    <grid:column label="cc.zcdMx.pointtwo" name="pointtwo" width="70"/>
    <grid:column label="cc.zcdHz.zhuangcdNo" name="zhuangcdNo" width="120" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.ywbm" name="ywbm" width="80"/>
    <grid:column label="cc.zcdMx.huozName" name="huozName" width="120"/>
    <grid:column label="cc.zcdMx.danwName" name="danwName" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.shangpNo" name="shangpNo" width="100" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.chineseName" name="chineseName" />
    <grid:column label="cc.zcdMx.tongyName" name="tongyName" width="80"/>
    <grid:column label="cc.zcdMx.lot" name="lot" width="100" query="true" condition="like"/>
    <grid:column label="cc.zcdMx.shijJs" name="shijJs" width="60"/>
    <grid:column label="cc.zcdMx.shijLss" name="shijLss" width="60"/>
    <grid:column label="cc.zcdMx.shijNum" name="shijNum" width="60"/>
    <grid:column label="cc.zcdMx.baozNum" name="baozNum" width="60"/>
    <grid:column label="cc.zcdMx.youxDate" name="youxDate" />
    <grid:column label="cc.zcdMx.wendMin" name="wendMin" />
    <grid:column label="cc.zcdMx.wendMax" name="wendMax" />
    <grid:column label="cc.zcdMx.address" name="address"  query="true" condition="like"/>
    <grid:column label="cc.zcdMx.czry" name="czry" width="60"/>
    <grid:column label="cc.zcdMx.dwId" name="dwId" width="100"/>
    <grid:column label="cc.zcdMx.zhuangcdId" name="zhuangcdId" width="140"/>
    <grid:column label="cc.zcdMx.liushBarcode" name="liushBarcode"/>
    <grid:column label="cc.cangku" name="cangku"/>

    <grid:toolbar function="search"/>
    <grid:toolbar function="reset"/>
</grid:grid>

<script type="text/javascript">

    function beforeInit() {
        var today = new Date();
        $('#beginDate_date').find("input").each(function(){
            $(this).val(today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate());
        });
    }

    function afterInit() {
        var queryParams = {own_flg: 'Y', 'query.own_flg||eq': 'Y'};
        var queryFields=$('#queryFields').val();
        queryParams['queryFields'] = queryFields;
        //普通的查询
        $('#ccZcdMxGridIdGridQuery').find(":input").each(function() {
            var val = $(this).val();
            if (queryParams[$(this).attr('name')]) {
                val = queryParams[$(this).attr('name')] + "," + $(this).val();
            }
            queryParams[$(this).attr('name')] = val;
        });

        // 普通的查询
        $('#ccZcdMxGridIdGridQuery').find(":input").each(function() {
            var condition = $(this).attr('condition');
            if (!condition) {
                condition = "";
            }
            var key = "query." + $(this).attr('name') + "||" + condition;
            queryParams[key] = queryParams[$(this).attr('name')];
        });

        $("#ccZcdMxGridIdGrid").jqGrid('setGridParam',{
            postData:queryParams, //发送数据
            datatype:'json',
            mtype:'get',
            url:'${adminPath}/cc/zcd/mx/zcdMxAjaxList?gridtype=jqgrid',
            prmNames:{
            //请求参数格式预处理
                page:"page.pn",
                rows:"page.size",
                sort:"sort",
                order: "order"
            }
        }).trigger('reloadGrid');
    }
</script>

</body>

</html>